import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'
import { Swipe, SwipeItem } from 'vant'

import axios from 'axios'
import App from './App.vue'
import router from './router'
import 'vant/es/toast/style';

import { 
    Button,
    DropdownMenu, 
    DropdownItem,
    NumberKeyboard,
    PasswordInput, 
    Popup,
    Icon,
    RadioGroup, 
    Radio,
    Search,
    ShareSheet,
    Skeleton,
    SkeletonTitle,
    SkeletonImage,
    SkeletonAvatar,
    SkeletonParagraph,
    Tab,
    Tabs,
    Toast,
    TextEllipsis,
    SwipeCell,
 } from 'vant';

import './assets/css/reset.css'

// axios.defaults.baseURL = 'https://apis.netstart.cn/maoyan'
const app = createApp(App)
app.config.globalProperties.$http = axios
app.config.globalProperties.$toast = Toast;
const store = createPinia()
store.use(piniaPluginPersist)
app.use(store)
app.use(Swipe)
app.use(SwipeItem)
app.use(SwipeCell)
app.use(router)

app.use(Button);
app.use(DropdownMenu);
app.use(DropdownItem);
app.use(NumberKeyboard);
app.use(PasswordInput);
app.use(Popup);
app.use(Icon);
app.use(Radio);
app.use(RadioGroup);
app.use(Search);
app.use(ShareSheet);
app.use(Skeleton);
app.use(SkeletonTitle);
app.use(SkeletonImage);
app.use(SkeletonAvatar);
app.use(SkeletonParagraph);
app.use(Tab);
app.use(Tabs);
app.use(Toast);
app.use(TextEllipsis);

app.mount('#app')
